package com.fsq.controller;


import com.aliyuncs.exceptions.ClientException;
import com.fsq.component.SmsComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fsq
 * @date 2020/07/27
 */
@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    private SmsComponent smsComponent;

    /**
     * 测试发送短信
     */
    @GetMapping("/send")
    public String send() throws ClientException {
        return smsComponent.SendSms();
    }
}
